# 钟奕升
# 一元二次方程求解
# ax**2+bx+c=0
import math
print("ax ** 2 + bx + c = 0")
a = float(input("二次项系数a="))
b = float(input("一次项系数b="))
c = float(input("常数项从c="))
if a != 0:
    d = b ** 2 - 4 * a * c
    d = math.sqrt(d)
    x1 = (-b + d) / (2 * a)
    x2 = (-b - d) / (2 * a)
    if d > 0:

        print("方程有俩个不同的解：x1=%.2f" % x1, "x2=%.2f" % x2)
    elif d == 0:
        print("方程有俩个相同的解：x1=x2=%.2f" % x1)
    else:
        print("方程无实数解")
else:
    print("不是yi元一次方程")
print("the end!!")


